<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="prc" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="keywords"
	content="responsive, template, portfolio, html, css, javascript, Theme" />
<meta name="author" content="">
<!--[if IE]><meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'><![endif]-->
<meta name="viewport"
	content="width=device-width,initial-scale=1.0,maximum-scale=1" />
<title>拾光动态</title>
<link
	href="http://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css"
	rel="stylesheet">
<style>
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	background: #494A5F;
	font-weight: 500;
	font-family: "Microsoft YaHei", "宋体", "Segoe UI", "Lucida Grande",
		Helvetica, Arial, sans-serif, FreeSans, Arimo;
}

div.search {
margin: 70px 0 auto;
height: 50px;
text-align: center;
width: 100%;
}

form {
	position: relative;
	width: 300px;
	margin: 0 auto;
	float: left;
}

input, button {
	border: none;
	outline: none;
}

input {
	width: 100%;
	height: 42px;
	padding-left: 13px;
}

button {
	height: 42px;
	width: 42px;
	cursor: pointer;
	position: absolute;
}
/*搜索框7*/
.bar7 {
	/* background: #7BA7AB; */
}

.bar7 form {
	height: 42px;
	margin: 0 auto;
	margin-left: 30%;
}

.bar7 input {
	width: 250px;
	border-radius: 42px;
	border: 2px solid #324B4E;
	background: #F9F0DA;
	transition: .3s linear;
	float: right;
}

.bar7 input:focus {
	width: 300px;
}

.bar7 button {
	background: none;
	top: -2px;
	right: 0;
}

.bar7 button:before {
	content: "\f002";
	font-family: FontAwesome;
	color: #324b4e;
}

* {
	margin: 0;
	padding: 0;
	text-decoration: none;
	list-style: none;
	box-sizing: border-box;
}

body {
	text-align: center;
}

html {
	font-size: 10px;
}

.main-content-cell1-right {
	height: 61.4rem;
	width: 99.2rem;
	background-color: #fff;
	display: flex;
	flex-wrap: wrap;
	margin: 0 auto;
}

.main-content-cell1-right div {
	height: 30rem;
	width: 23.4rem;
	margin: 0 0 1.4rem 1.4rem;
	background-color: #E1ECE8;
	text-align: center;
}

.main-content-cell1-right div img {
	height: 16rem;
	width: 16rem;
	margin: 3rem 3.7rem 3rem 3.7rem;
}

.main-content-cell1-right div span:nth-of-type(1) {
	font-size: 1.4rem;
	color: #333;
}

.main-content-cell1-right div span:nth-of-type(2) {
	font-size: 1.2rem;
	color: #b0b0b0;
	color: red;
}

.main-content-cell1-right div span:nth-of-type(3) {
	font-size: 1.2rem;
	color: #ff6700;
}

#paging {
	margin: 0 auto;
	width: 50%;
	height: 100px;
	/*border: 1px solid red;*/
	text-align: center;
}

ul.pagination li {
	list-style-type: none;
	display: inline;
}

ul.pagination li a {
	text-decoration: none;
	color: black;
	padding: 8px 10px; /*10px左右内边距， 8px上下内边距*/
	border: 1px solid darkgray;
	border-radius: 20px;
}

ul.pagination li a.active {
	background: green;
	color: white;
}

/*如果类名不为active并且鼠标经过才显示的样式*/
ul.pagination li a:hover:not (.active ) {
	background: darkseagreen;
	border: 1px solid green;
	font-size: 19px;
}
#city{
height: 42px;
width: 500px;
margin: 5px auto;
}
select{  
            width:200px;  
            height:30px;  
            appearance:none;  
            -moz-appearance:none;  
            -webkit-appearance:none;  
            background: url("../images/sel-bg.png") no-repeat 170px center;  
            background-size:10%;
            font-size:16px;  
            font-family:Microsoft YaHei;  
            color:#666;  
            outline:none;
        }
</style>

</head>

<body>
	<%@include file="header.jsp"%>

	<div class="search bar7">
		<form action="searchstrategy">
			<input type="text" name="search" placeholder="请输入您要搜索的内容...">
			<button type="submit"></button>
		</form>
		<form id="city" action="strategyclassification">
			<select id="pro" onchange="ChangeProvinceSelect(this.selectedIndex)"></select>
		<select id="ci" name="address">
			<option>请选择</option>
		</select>
			<button type="submit"></button>
		</form>
	</div>
	
	
	<div class="main-content-cell1-right">
		<c:forEach var="s" items="${findAllStrategy.list }">
			<a href="strategyinfo?id=${s.id }">
				<div>
					<c:forEach var="listimg" begin="0" end="1" step="3"
						items="${s.listimg }">
						<img src="${prc }/img/${listimg.img}" class="img-rounded">
					</c:forEach>
					<span>${s.themes }</span><br> <span>${s.address }景区</span><br>
					<span>来自:${s.user.username }</span>
				</div>
			</a>
		</c:forEach>
	</div>
		
		<c:if test="${findAllStrategy!=null }">
	<div id="paging">
		<ul class="pagination">
		<c:if test="${findAllStrategy.pageNum>=2}">
			<li><a href="strategylist?pageNum=1&&pageSize=${findAllStrategy.pageSize }">首页</a></li>
			<li><a href="strategylist?pageNum=${findAllStrategy.prePageNum}&&pageSize=${findAllStrategy.pageSize }">上一页</a></li>
			<li><a >...</a></li>
			<li><a href="strategylist?pageNum=${findAllStrategy.prePageNum}&&pageSize=${findAllStrategy.pageSize }">${findAllStrategy.prePageNum}</a></li>
			</c:if>
			<li><a class="active" >${findAllStrategy.pageNum}</a></li>
			<c:if test="${findAllStrategy.pageNum<findAllStrategy.totalPageNum}">
			<li><a href="strategylist?pageNum=${findAllStrategy.nextPageNum}&&pageSize=${findAllStrategy.pageSize }">${findAllStrategy.nextPageNum}</a></li>
			<li><a >...</a></li>
			<li><a href="strategylist?pageNum=${findAllStrategy.nextPageNum}&&pageSize=${findAllStrategy.pageSize }">下一页</a></li>
			<li><a href="strategylist?pageNum=${findAllStrategy.totalPageNum}&&pageSize=${findAllStrategy.pageSize }">尾页</a></li>
			</c:if>
		</ul>
	</div>
	</c:if>



</body>
<script type="text/javascript">
	var province = [ "请选择", "北京市", "上海市", "天津市", "重庆市", "河北省", "山西省", "辽宁省",
			"吉林省", "黑龙江省", "江苏省", "浙江省", "安徽省", "福建省", "江西省", "山东省", "河南省",
			"湖北省", "湖南省", "广东省", "海南省", "四川省", "贵州省", "云南省", "陕西省", "甘肃省",
			"青海省", "台湾省", "广西壮族自治区", "内蒙古自治区", "西藏自治区", "宁夏回族自治区", "新疆维吾尔自治区",
			"香港特别行政区", "澳门特别行政区" ];
	var city = [
			[ "请选择" ],
			[ "北京市区", "北京市辖区" ],
			[ "上海市区", "上海市辖区" ],
			[ "天津市区", "天津市辖区" ],
			[ "重庆市区", "重庆市辖区" ],
			[ "石家庄", "唐山市", "邯郸市", "秦皇市岛", "保市定", "张家市口", "承德市", "廊坊市", "沧州市",
					"衡水市", "邢台市" ],
			[ "太原市", "大同市", "阳泉市", "长治市", "晋城市", "朔州市", "晋中市", "运城市", "忻州市",
					"临汾市", "吕梁市" ],
			[ "沈阳市", "大连市", "鞍山市", "抚顺市", "本溪市", "丹东市", "锦州市", "营口市", "阜新市",
					"辽阳市", "盘锦市", "铁岭市", "朝阳市", "葫芦岛市" ],
			[ "长春市", "吉林市", "四平市", "辽源市", "通化市", "白山市", "松原市", "白城市", "延边州",
					"长白山管委会" ],
			[ "哈尔滨市", "齐齐哈尔市", "大庆市", "佳木斯市", "牡丹江市", "七台河市", "双鸭山市", "黑河市",
					"鸡西市", "伊春市", "绥化市", "鹤岗市", "加格达奇市" ],
			[ "南京市", "苏州市", "无锡市", "常州市", "南通市", "扬州市", "镇江市", "泰州市", "盐城市",
					"连云港市", "宿迁市", "淮安市", "徐州市" ],
			[ "杭州市", "宁波市", "温州市", "嘉兴市", "湖州市", "绍兴市", "金华市", "衢州市", "舟山市",
					"台州市", "丽水市" ],
			[ "合肥市", "芜湖市", "蚌埠市", "淮南市", "马鞍山市", "淮北市", "铜陵市", "安庆市", "黄山市",
					"滁州市", "阜阳市", "宿州市", "巢湖市", "六安市", "亳州市", "池州市", "宣城市" ],
			[ "福州市", "厦门市", "莆田市", "三明市", "泉州市", "漳州市", "南平市", "龙岩市", "宁德市" ],
			[ "南昌市", "景德镇市", "萍乡市", "九江市", "新余市", "鹰潭市", "赣州市", "吉安市", "宜春市",
					"抚州市", "上饶市" ],
			[ "济南市", "青岛市", "淄博市", "枣庄市", "东营市", "烟台市", "潍坊市", "济宁市", "泰安市",
					"威海市", "日照市", "莱芜市", "临沂市", "德州市", "聊城市", "滨州市", "菏泽市" ],
			[ "郑州市", "开封市", "洛阳市", "平顶山市", "安阳市", "鹤壁市", "新乡市", "焦作市", "濮阳市",
					"许昌市", "漯河市", "三门峡市", "南阳市", "商丘市", "信阳市", "周口市", "驻马店市" ],
			[ "武汉市", "黄石市", "十堰市", "荆州市", "宜昌市", "襄樊市", "鄂州市", "荆门市", "孝感市",
					"黄冈市", "咸宁市", "随州市" ],
			[ "长沙市", "株洲市", "湘潭市", "衡阳市", "邵阳市", "岳阳市", "常德市", "张家界市", "益阳市",
					"郴州市", "永州市", "怀化市", "娄底市" ],
			[ "广州市", "深圳市", "珠海市", "汕头市", "韶关市", "佛山市", "江门市", "湛江市", "茂名市",
					"肇庆市", "惠州市", "梅州市", "汕尾市", "河源市", "阳江市", "清远市", "东莞市",
					"中山市", "潮州市", "揭阳市", "云浮市" ],
			[ "三亚市", "海口市", "文昌市", "琼海市", "万宁市", "五指山市", "东方市", "儋州市" ],
			[ "成都市", "自贡市", "攀枝花市", "泸州市", "德阳市", "绵阳市", "广元市", "遂宁市", "内江市",
					"乐山市", "南充市", "眉山市", "宜宾市", "广安市", "达州市", "雅安市", "巴中市",
					"资阳市" ],
			[ "贵阳市", "六盘水市", "遵义市", "安顺市" ],
			[ "昆明市", "曲靖市", "玉溪市", "保山市", "昭通市", "丽江市", "普洱市", "临沧市" ],
			[ "西安市", "铜川市", "宝鸡市", "咸阳市", "渭南市", "延安市", "汉中市", "榆林市", "安康市",
					"商洛市" ],
			[ "兰州市", "金昌市", "白银市", "天水市", "嘉峪关市", "武威市", "张掖市", "平凉市", "酒泉市",
					"庆阳市", "定西市", "陇南市" ],
			[ "西宁市" ],
			[ "台北市", "高雄市", "基隆市", "台中市", "台南市", "新竹市", "嘉义市" ],
			[ "南宁市", "柳州市", "桂林市", "梧州市", "北海市", "防城港市", "钦州市", "贵港市", "玉林市",
					"百色市", "贺州市", "河池市", "来宾市", "崇左市" ],
			[ "呼和浩特市", "包头市", "乌海市", "赤峰市", "通辽市", "鄂尔多斯市", "呼伦贝尔市", "巴彦淖尔市",
					"乌兰察布市" ], [ "拉萨市" ],
			[ "银川市", "石嘴山市", "吴忠市", "固原市", "中卫市" ], [ "乌鲁木齐市", "克拉玛依市" ],
			[ "香港特别行政区" ], [ "澳门特别行政区" ] ];
	//new Array()    
	var pro = document.getElementById("pro");
	//指定列表pro中option的数量
	pro.length = province.length;
	//添加元素
	for (var i = 0; i < province.length; i++) {
		pro.options[i].text = province[i];
		pro.options[i].value = i;
	}

	function ChangeProvinceSelect(index) {
		var ci = document.getElementById("ci");
		ci.length = city[index].length + 1;
		ci.options[0].text = city[0][0];
		for (var i = 0; i < city[index].length; i++) {
			ci.options[i + 1].text = city[index][i];
			ci.options[i + 1].value = city[index][i];
		}
	}
</script>
</html>
